IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[spVehicleJob_GetVehicleJob]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spVehicleJob_GetVehicleJob]
GO


GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Eric Liew
-- Create date: 6/2/2009
-- Description:	Get a Vehicle
-- =============================================
CREATE PROCEDURE [dbo].[spVehicleJob_GetVehicleJob]
(
		@JobId INT	
)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;


	SELECT 
		JobId,
		VehicleId,
		JobDate,
		Mechanic,
		Kms,
		StartTime,
		EndTime,
		Damages,
		WorkDone,
		Active
	FROM VehicleJob
	Where Active = 1
	AND JobId = @JobId
 
 

END
GO
